from build_qa_agent import build_agent

def main():
    agent = build_agent()
    print("🤖 教育智能体启动。输入 'exit' 退出。")
    while True:
        user_input = input("你：")
        if user_input.lower() in ['exit', 'quit']:
            break
        try:
            response = agent.run(user_input)
            print("智能体：", response)
        except Exception as e:
            print("⚠️ 出错：", e)

if __name__ == "__main__":
    main()
